package UnOfficeDeTourisme;

/**
 * Interface definition : Touriste
 * 
 * @author OpenORB Compiler
 */
public abstract class TouristePOA extends org.omg.PortableServer.Servant
        implements TouristeOperations, org.omg.CORBA.portable.InvokeHandler
{
    public Touriste _this()
    {
        return TouristeHelper.narrow(_this_object());
    }

    public Touriste _this(org.omg.CORBA.ORB orb)
    {
        return TouristeHelper.narrow(_this_object(orb));
    }

    private static String [] _ids_list =
    {
        "IDL:UnOfficeDeTourisme/Touriste:1.0"
    };

    public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte [] objectId)
    {
        return _ids_list;
    }

    public final org.omg.CORBA.portable.OutputStream _invoke(final String opName,
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler)
    {

        if (opName.equals("_get_mailT")) {
                return _invoke__get_mailT(_is, handler);
        } else if (opName.equals("_get_nomT")) {
                return _invoke__get_nomT(_is, handler);
        } else if (opName.equals("_get_prenomT")) {
                return _invoke__get_prenomT(_is, handler);
        } else if (opName.equals("demanderAvis")) {
                return _invoke_demanderAvis(_is, handler);
        } else {
            throw new org.omg.CORBA.BAD_OPERATION(opName);
        }
    }

    // helper methods
    private org.omg.CORBA.portable.OutputStream _invoke__get_nomT(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg = nomT();
        _output = handler.createReply();
        _output.write_string(arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_prenomT(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg = prenomT();
        _output = handler.createReply();
        _output.write_string(arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_mailT(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg = mailT();
        _output = handler.createReply();
        _output.write_string(arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_demanderAvis(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        UnOfficeDeTourisme.Visite arg0_in = UnOfficeDeTourisme.VisiteHelper.read(_is);

        try
        {
            String _arg_result = demanderAvis(arg0_in);

            _output = handler.createReply();
            _output.write_string(_arg_result);

        }
        catch (UnOfficeDeTourisme.AvisInvalideException _exception)
        {
            _output = handler.createExceptionReply();
            UnOfficeDeTourisme.AvisInvalideExceptionHelper.write(_output,_exception);
        }
        return _output;
    }

}
